/**
 * 20220210:created by jordia
 */
import DragCenterConfig from "./drag-center-config";

/**
 * drag-config for group which combined by meshes
 */
export default class DragMeshGroupConfig extends DragCenterConfig{
    constructor(values={}){
        super(values);
    }

    get type(){
        return 'DragMeshGroupConfig';
    }

    getIntersects(object,out=[]){
        this._mga.length=0;
        this._raycaster.intersectObject(object,true,this._mga);
        for(let isc of this._mga){
            isc.object=object;
            out.push(isc);
        }
        return out;
    }

    _initVariable() {
        super._initVariable();
        this._mga=[];
    }
}